package command;

import model.EnhancedCostEvaluator;
import model.Solution;

public class InsertProcessToMachineCommand implements Command {
	EnhancedCostEvaluator costEvaluator;
	Solution new_solution;
	int p_id;
	int m_id;

	public InsertProcessToMachineCommand(EnhancedCostEvaluator ce) {
		this.costEvaluator = ce;
		this.new_solution = costEvaluator.getNewSolution();
	}

	public void setP_id(int p_id) {
		this.p_id = p_id;
	}

	public void setM_id(int m_id) {
		this.m_id = m_id;
	}

	@Override
	public void execute() {
		new_solution.assignProcessToMachine(p_id, m_id);

	}

	@Override
	public void undo() {
		new_solution.removeProcess(p_id);
	}

}
